package com.gable.report.common.util;

/**
 * Created by mj on 2017/7/26.
 */
public enum MonthEnumUtil {
    January("1","一月"),
    February("2","二月"),
    March("3","三月"),
    April("4","四月"),
    May("5","五月"),
    June("6","六月"),
    July("7","七月"),
    August("8","八月"),
    September("9","九月"),
    October("10","十月"),
    November("11","十一月"),
    December("12","十二月");
    private String key;
    private String value;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    private MonthEnumUtil(String key, String value){
        this.key = key;
        this.value = value;
    }

    public static String getValue(String key){
        MonthEnumUtil [] values = MonthEnumUtil.values();
        for(MonthEnumUtil ce : values){
            if(ce.getKey().equals(key)){
                return ce.getValue();
            }
        }
        return null;
    }
}
